#include<stdio.h>
int main()
{
	int a = 1, b = 1, c = 0, n = 0, i = 0;
	scanf_s("%d", &n);
	if (n > 2)
	{
		for (i = 3; i <= n; i++)
		{
			c = a + b;
			a = b;
			b = c;
		}
	}
	else
	{
		c = 1;
	}
	printf("%d", c);
	return 0;
}